<?php
/**
 * 微校云主界面模型
 * Author: 孙武 QQ:1228746736
 * Date: 2017/11/1
 * Time: 10:37
 */

namespace Home\Model;
class ApiModel extends \Think\Model
{


    /**
     * 返回未支付的订单
     * 订单包括预定未支付，订票未支付
     * @return mixed
     */
    public function getHadNoPay()
    {
        //获取未支付的订单
        $map = array('od_pay_status' => '0');
        $res = $this->where($map)->select();

        //获取已确认的预定订单
        $mapPre = array('od_pay_status' => '0', 'od_is_depart' => '1');
        $resPre = D('pre_order')->where($mapPre)->select();

        foreach ($resPre as $v) {
            array_push($res, $v);
        }
        return $res;
    }
}